<%@page contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>

<style>
#skill .tableform .skillhead{
	text-align: left;
}
</style>
<script type="text/javascript">
	var form_url = $.webapp.root+"/admin/system/personinfo/doNotNeedAuth_add.do" ;
	var org, position, $person_select_dg ;
	$(function() {
		$('#icheck input').iCheck({
			checkboxClass: 'icheckbox_minimal-blue',
			radioClass: 'iradio_square-blue'
	   	});
		
		loadData() ;
	});
	
	function loadData(personId) {
		selectField() ;
		
		$.easyui.loading({ msg: "数据加载中，请稍等...", locale: "#contentPanel" }) ;
		
		var id = $('input[name=id]').val() ;
		var num = $('input[name=num]').val() ;
		var params = {};
		if(undefined != id && ""!=id) {
			params = {id: id};
		}
		if(undefined != num && ""!=num) {
			params = {num: num};
		}
		
		form_url = $.webapp.root+"/admin/system/personinfo/doNotNeedAuth_update.do" ;
		$.post($.webapp.root+"/admin/system/personinfo/get.do", params, function(result) {
			if (result.id != undefined) {
				
				$("input[name=yueyu][value="+result.yueyu+"]").iCheck('check') ;
				$('#basic_info_form').form('load', result);
				
				$('#jdl_form').form('load', result);
				
				
			}
		}, 'json').error(function() { $.easyui.loaded(); });
		$.easyui.loaded("#contentPanel", true);
		
		$(".remove").on("click", function(){
			$(this).siblings().iCheck('uncheck') ;
		});
		
	}
	
	function selectField() {
		org = $("#org").combotree({
			url : $.webapp.root+"/static_res/org.tree.json",
			idFiled:'pid', textFiled:'name', editable: false, required:false, lines:true, autoShowPanel: false
		});
		
		position = $("#position").combotree({
			url : $.webapp.root+"/static_res/position.tree.json",
			idFiled:'pid', textFiled:'name', editable: false, required:false, lines:true, autoShowPanel: false
		});
	}
	
	//提交表单数据
	var submitNow = function($d, $dg, flag) {
		var o = $.webapp.serializeObject("#basic_info_form") ;
		$.post(form_url, o, function(result) {
			if (result.status) {
				$dg.datagrid('reload');alertify.success(result.msg);$.easyui.loaded();
				if(flag==undefined||flag==false){$d.dialog("close") ;}
			} else {
				$.easyui.loaded();$.messager.alert("错误", result.msg, "error");
			}
		}, 'json').error(function() { $.easyui.loaded(); });
	};
	
	//验证表单
	var submitForm = function($d, $dg, flag) { 
		if($('#form').form('validate')) {
			$.easyui.loading({ msg: "数据提交中，请稍等..." });
			submitNow($d, $dg, flag) ;
		}
	};
	
	function chkUn() {
		$('input').iCheck('uncheck'); 
	}
	
</script>

<div class="easyui-layout" data-options="fit: true">
	
	<div id="contentPanel" data-options="region: 'center', border: true" style="border-left:0px;border-top:0px;border-bottom:0px;overflow: auto;">
		<form id="basic_info_form">
			<div class="form_container">
				<input type="hidden" name="id" value="${id}" />
				<input type="hidden" name="num" value="${num}" />
				<table class="tableform">
					<tr>
						<th>姓名：</th>
						<td><input name="name" class="easyui-validatebox" type="text" readonly="readonly" /></td>
					</tr>
					<tr>
						<th>性别：</th>
						<td>
							<input id="XB" name="sex" type="text" class="easyui-combobox" readonly="readonly" data-options="autoShowPanel: false" style="width:219px;height:25px;"/>
						</td>
					</tr>
					<tr>
						<th>日语级别：</th>
						<td>
							<input name="ryjb" type="text" class="easyui-validatebox" readonly="readonly"/>
						</td>
					</tr>
					<tr>
						<th>机构部门：</th>
						<td colspan="3">
							<input id="org" name="org_id" readonly="readonly" style="width:219px;height:25px;" />
							<input type="hidden" name="org_name"/>
						</td>
					</tr>
					<tr>
						<th>分配岗位：</th> 
						<td>
							<input id="position" name="position_id" readonly="readonly" style="width:219px;height:25px;" />
							<input type="hidden" name="position_name"/>
						</td>
					</tr>
					<tr>
						<th>工作年数：</th> 
						<td>
							<input name="gzjyns" type="text" class="easyui-validatebox" readonly="readonly"/>
						</td>
					</tr>
					<tr>
						<th>在日BSE经验月数：</th> 
						<td>
							<input name="zrbsejyns" type="text" class="easyui-validatebox" readonly="readonly"/>
						</td>
					</tr>
					
					<tr>
						<th>状态：</th>
						<td>
							<select class="easyui-combobox" name="status" data-options="panelHeight: 'auto'">
								<option value="已受注">已受注</option>
								<option value="候补" selected="selected">候补</option>
							</select>
						</td>
					</tr>
					<tr>
						<th>假名：</th>
						<td><input name="jiaming" class="easyui-validatebox" type="text" /></td>
					</tr>
					<tr>
						<th>签证有无：</th>
						<td>
							<select class="easyui-combobox" name="qzyw" data-options="panelHeight: 'auto'">
								<option value="有">有</option>
								<option value="无" selected="selected">无</option>
							</select>
						</td>
					</tr>
					<tr>
						<th>签证有效期：</th>
						<td>
							<input name="qzyxq" style="width:219px;height:25px;" class="easyui-my97" data-options="isShowClear:true" />
						</td>
					</tr>
					<tr>
						<th>护照有无：</th>
						<td>
							<select class="easyui-combobox" name="hzyw" data-options="panelHeight: 'auto'">
								<option value="有">有</option>
								<option value="无" selected="selected">无</option>
							</select>
						</td>
					</tr>
					<tr>
						<th>护照有效期：</th>
						<td>
							<input name="hzyxq" style="width:219px;height:25px;" class="easyui-my97" data-options="isShowClear:true" />
						</td>
					</tr>
					<tr>
						<th>希望出差地点：</th>
						<td><input name="toCity" class="easyui-validatebox" type="text" /></td>
					</tr>
					<tr>
						<th>熟悉技能：</th>
						<td><input name="sxjn" class="easyui-validatebox" type="text" />如：設計、C#、ASP.NET</td>
					</tr>
					<tr>
						<th>擅长领域：</th>
						<td><input name="lcly" class="easyui-validatebox" type="text" />如：医療、情報、自動車、公共</td>
					</tr>
					<tr>
						<th>出差实际日期：</th>
						<td>
							<input name="ccsjrq" style="width:219px;height:25px;" class="easyui-my97" data-options="isShowClear:true" />
						</td>
					</tr>
					<tr>
						<th>出差预订日：</th>
						<td><input name="ccydr" style="width:219px;height:25px;" class="easyui-my97" data-options="isShowClear:true" /></td>
					</tr>
					<tr>
						<th>长期出差可能：</th>
						<td>
							<select class="easyui-combobox" name="cqcckn" data-options="panelHeight: 'auto'">
								<option value="长期">长期</option>
								<option value="短期" selected="selected">短期</option>
							</select>
						</td>
					</tr>
					<tr>
						<th>java经验年数：</th>
						<td><input name="javaYear" class="easyui-numberbox" data-options="" type="text" />年</td>
					</tr>
					<tr>
						<th>.net经验年数：</th>
						<td><input name="netYear" class="easyui-numberbox" data-options="" type="text" />年</td>
					</tr>
					<tr>
						<th>客户：</th>
						<td><input name="kh" class="easyui-validatebox" type="text" />如：HISYS/金事</td>
					</tr>
					<tr>
						<th>案件：</th>
						<td><input name="aj" class="easyui-validatebox" type="text" />如：みずほ</td>
					</tr>
				</table>
			</div>
		</form>
	</div>
	

</div>


